<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
  <title>投资游戏</title>
  <link rel="stylesheet" href="./css/index.css">
<style>
	body {
		background-color: #fff;
	}
	
	.mTitle {
		color: black;
		background-color: gray;
		margin: 10px;
		padding: 10px;
		font-size: 22px;
	}
</style>
</head>
<body>
<div id="app">

	<van-cell-group>
		<van-cell>
			<van-col span="24">
				<div class="mTitle" align="center">
					【我的信息】
				</div>
			</van-col>
		</van-cell>
		<van-cell>
			<van-row>
				<br>
			</van-row>
		</van-cell>
		<van-cell>
			<van-row>
				<van-col span="12">
					当前总金额: {{ dangQianZongJinE }}
				</van-col>
				<van-col span="12">
					当前可用金额: {{ dangQianKeYongJinE }}
				</van-col>
			</van-row> 
				<van-col span="24">
					每日金额图表
				</van-col>
			<van-row>
				暂无
			</van-row>
			<van-row>
				<van-col span="12">
					持有收益: {{ chiYouShouYi }}
				</van-col>
				<van-col span="12">
					持有收益率: {{ chiYouShouYiLv }}
				</van-col>	
			</van-row>		
		</van-cell>
		<van-cell>
			<van-row>
				<van-col span="24" align="center">
					【AI_预测】
				</van-col>
			</van-row>
			<van-row>
				暂时不实现
			</van-row>
			<van-row>
				<van-col span="12">
					预测天数: {{ yuCeTianShu }}
				</van-col>
				<van-col span="12">
					正确天数: {{ zhengQueTianShu }}
				</van-col>
			</van-row>
			<van-row>
				<van-col span="12">
					预测正确比率: {{ yuCeZhengQueBiLv }}
				</van-col>
				<van-col span="12">
					错误天数: {{ cuoWuTianShu }}
				</van-col>
			</van-row>
		</van-cell>
		<van-cell>
			<van-row>
				<van-col span="24" align="center">
					【持有分析】
				</van-col>
			</van-row>
			
		</van-cell>
		
		
	</van-cell-group>
	<van-tabbar v-model="subActive" @change="onChange">
	  <van-tabbar-item icon="home-o">首页</van-tabbar-item>
	  <van-tabbar-item icon="search">基金</van-tabbar-item>
	  <van-tabbar-item icon="friends-o">买卖</van-tabbar-item>
	  <van-tabbar-item icon="setting-o">消息</van-tabbar-item>
	  <van-tabbar-item icon="manager-o">我的</van-tabbar-item>
	</van-tabbar>
</div>
</body>

<script src="./js/vue.min.js"></script>
<script src="./js/vant.min.js"></script>
<script src="./js/axios.min.js"></script>
<script type="text/javascript">


	new Vue({
		el: '#app',
		data() {
			return {
				aaa: 'abc',
				active: 0,
				subActive: 4,
				dangQianZongJinE: '0',
				dangQianKeYongJinE: '0',
				meiRiJinETuBiao: '0',
				chiYouShouYi: '0',
				chiYouShouYiLv: '0',
				yuCeTianShu: '0',
				zhengQueTianShu: '0',
				yuCeZhengQueBiLv: '0',
				cuoWuTianShu: '0',
			};
		},
		created: function(){
			console.log('created');
			vant.Toast('我的信息');
			this.initial()
		},
		methods: {
			click1() {
				window.location.href = "a2.html";
			},
			initial(){
				console.log("initial()");
				//totalCost:"100000"
				//this.dangQianZongJinE = localStorage.getItem("totalCost")
				//lastCost:"99904.619"
				this.dangQianKeYongJinE = localStorage.getItem("lastCost")
				let amount1 = localStorage.getItem("amount")
				let dqzje1 = parseFloat(this.dangQianKeYongJinE) 
					+ parseFloat(amount1)
				console.log("dqzje1-=>",dqzje1);
				this.dangQianZongJinE = dqzje1.toFixed(2)
				
				let cysy1 = this.dangQianZongJinE - 100000
				this.chiYouShouYi = cysy1.toFixed(2)
				let cysyl1 = ((this.dangQianZongJinE / 100000) -1) * 100
				this.chiYouShouYiLv = cysyl1.toFixed(2) + '%'
			},
			onChange(index){
				vant.Toast('提示:'+index);
				//vant.Notify({type:'primary',message:index});
				console.log("index-=>",index);
				if(index===0){
					window.location.href = 'gpIndex.html';
				}else if(index===1){
					window.location.href = 'alljjList.html';
				}else if(index===2){
					window.location.href = 'buySell.html';
				}else if(index===3){
					window.location.href = 'msgNotify.html';
				}else if(index===4){
					window.location.href = 'myInfo.html';
				}
			},
		}
	});
	

</script>
</html>